/*
 * Powered By [rapid-framework]
 * Web Site: http://www.rapid-framework.org.cn
 * Google Code: http://code.google.com/p/rapid-framework/
 * Since 2008 - 2019
 */

package com.jzwl.site.wap.articlefabulous.service;

import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.jzwl.site.wap.articlefabulous.dao.SiteArticleUserFabulousDao;

@Service("siteArticleUserFabulousService")
public class SiteArticleUserFabulousService {

	@Autowired
	private SiteArticleUserFabulousDao siteArticleUserFabulousDao;

	public int siteArticleUserFabulous(Map<String, Object> map) {
		List list = siteArticleUserFabulousDao.querySiteArticleUserFabulous(map);
		if (list.size() == 0) {
			siteArticleUserFabulousDao.addSiteArticleUserFabulous(map);
			return 1;
		} else {
			siteArticleUserFabulousDao.deleteSiteArticleUserFabulous(map);
			return 0;
		}
	}

	public List querySiteArticleUserFabulous(Map<String, Object> map) {

		return siteArticleUserFabulousDao.querySiteArticleUserFabulous(map);

	}

}
